import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'component/home/home.dart';
import 'component/login/login.dart';

const homeRouterPath = "/";
const loginRouterPath = "/login";

var routerInfoList = [
  _RouterInfo(homeRouterPath, Home()),
  _RouterInfo(loginRouterPath, Login()),
];

class _RouterInfo {

  final String routerPath;

  final Widget widget;

  _RouterInfo(this.routerPath, this.widget);
}

List<GetPage>? buildRouters() {
  return routerInfoList
      .map((routerInfo) =>
          GetPage(name: routerInfo.routerPath, page: () => routerInfo.widget))
      .toList();
}
